<%--
  Created by IntelliJ IDEA.
  User: lenovo
  Date: 2018/4/15
  Time: 15:26
  To change this template use File | Settings | File Templates.
--%>
<%@page contentType="text/html;charset=UTF-8" language="java" %>
<script type="text/javascript" src="http://webapi.amap.com/maps?v=1.4.4&key=6ab54bbae71a979ed0d4d6fda7948e48"></script>

<!doctype html>
<html>
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="initial-scale=1.0, user-scalable=no, width=device-width">
    <title>地图预览</title>
    <link rel="stylesheet" href="http://cache.amap.com/lbs/static/main1119.css"/>
    <script type="text/javascript"
            src="http://webapi.amap.com/maps?v=1.4.5&key=6ab54bbae71a979ed0d4d6fda7948e48"></script>
    <script type="text/javascript" src="http://cache.amap.com/lbs/static/addToolbar.js"></script>
</head>
<body>
<div id="container" class="map" tabindex="0"></div>
<div class='button-group' style="background-color: #ffe69f">
    <input type='radio' onclick='refresh(this.value)' checked name='mapStyle' value='normal'>标准
    <input type='radio' onclick='refresh(this.value)' name='mapStyle' value='dark'>幻影黑
    <input type='radio' onclick='refresh(this.value)' name='mapStyle' value='light'>月光银
    <input type='radio' onclick='refresh(this.value)' name='mapStyle' value='fresh'>草色青
    <input type='radio' onclick='refresh(this.value)' name='mapStyle' value='grey'>雅士灰<br>
    <input type='radio' onclick='refresh(this.value)' name='mapStyle' value='graffiti'>涂鸦
    <input type='radio' onclick='refresh(this.value)' name='mapStyle' value='whitesmoke'>远山黛
    <input type='radio' onclick='refresh(this.value)' name='mapStyle' value='macaron'>马卡龙
    <input type='radio' onclick='refresh(this.value)' name='mapStyle' value='blue'>靛青蓝
    <input type='radio' onclick='refresh(this.value)' name='mapStyle' value='darkblue'>极夜蓝<br>
    <input type='radio' onclick='refresh(this.value)' name='mapStyle' value='wine'>酱籽

</div>
<script type="text/javascript">
    var map = new AMap.Map('container', {
        resizeEnable: true,
        center: [116.408075, 39.950187]
    });
    function refresh(enName) {
        map.setMapStyle('amap://styles/'+enName);
    }
</script>
</body>
</html>